package com.itheima.demo;

public class Java_02 {
    public static void main(String[] args) {
        //定义一个数组
        int[] arry = {20,30,30,40,50};
        String[] names = {"牛儿","二牛","狗蛋"};
        int[] ages = new int[]{10,20,30,40,50,60,70,80};
        String[] address = new  String[]{"河北省邢台市清河县"};
        System.out.println(ages[0]);
        System.out.println(ages[1]);
        System.out.println(ages[2]);
        System.out.println(address[0]);
        //修改数组中的数据
        ages[1] = 100;
        System.out.println(ages[1]);
        System.out.println(ages.length);
        System.out.println("ages这个数组中的最大索引是："+ (ages.length - 1));


    }
}
